package homework;

/**
 * @author wly
 * @create 2022-12-11 9:46
 */
public class Car {
    private double temperature;

    public Car(double temperature) {
        this.temperature = temperature;
    }

    public Air getAir(){
        return new Air();
    }

    class Air{

        private Air(){

        }

        public void flow(){
            if (temperature > 40){
                System.out.println("开始吹冷风！ current temperature = " + temperature);
            }else if(temperature < 0){
                System.out.println("开始吹热风！current temperature = " + temperature);
            }else {
                System.out.println("别矫情，浪费电，关机。current temperature = " + temperature);
            }
        }
    }
}
